//
//  JJReactNativeRequest.m
//  ClaimPlatform_RN
//
//  Created by gongjian on 2018/4/19.
//  Copyright © 2018 jj. All rights reserved.
//

#import "JJReactNativeRequest.h"

#import "JJReactNativeModel.h"
#import "JJNSStringHelper.h"

@implementation JJReactNativeRequest

- (instancetype)initWithIdentity:(NSString *)identity
                      parameters:(NSDictionary *)parameters
                    isEncryption:(BOOL)isEncryption
                      modelClass:(Class)modelClass
                  isSaveToMemory:(BOOL)isSaveToMemory
                    isSaveToDisk:(BOOL)isSaveToDisk
{
    self = [super initWithIdentity:identity parameters:parameters isEncryption:isEncryption modelClass:modelClass isSaveToMemory:isSaveToMemory isSaveToDisk:isSaveToDisk];
    if (self) {
        self.userCacheDirectory = @"JJReactNativeService";
    }
    
    return self;
}

- (id)convertToModel:(NSString *)JSONString_
{
    JJReactNativeModel *model = [super convertToModel:JSONString_];
    model.rnDataContentStr = JSONString_;
    return model;
}

@end
